@echo off
cd _master_bats
call config.bat
cd..
if "%1"=="" goto :error
if "%2"=="" (
if exist "%MASTER_SRC_PATH%\%1.java" goto :error2
) else (
if exist "%SPECIFIC_SRC_PATH%\%1.java" goto :error2
)
if "%2"=="" (
cd %MASTER_SRC_PATH%
) else (
cd %SPECIFIC_SRC_PATH%
)
if not "%2"=="" (
if exist "%MASTER_SRC_PATH%\%1.java" (
copy /Y %MASTER_SRC_PATH%\%1.java > NUL
goto :end
)
)
echo package %PKG_NAME%;> %1.java
echo.>> %1.java
echo interface %1>> %1.java
echo {>> %1.java
echo.>> %1.java
echo }>> %1.java
cd..
@echo.
@echo.
@echo DONE SUCCESFULLY!
@echo.
@echo.
goto :end
:error
color 0C
@echo.
@echo.
@echo ::::: ERROR: YOU MUST SPECIFY A NAME! :::::
@echo.
@echo.
goto :end
:error2
color 0C
@echo.
@echo.
@echo ::::: ERROR: CLASS ALREADY EXISTS! :::::
@echo.
@echo.
goto :end
:end
pause > NUL
color
cd..
@echo.
@echo.
@echo ::::: ERROR: HEADER ALREADY EXISTS! :::::
@echo.
@echo.
:end
